'use strict'

//简单爬取网页内容

let http = require('http');

http.get('https://nodejs.org/en/',(res)=>{
    var html = '';

    res.on('data',(txt)=>{
        console.log(txt.length);
        // html+=txt;z
    })

    res.on('end',()=>{
        console.log(html);
    })
})